﻿@model LeadMaster.Models.ClientUsers
<div class="spacer"></div>
<h2>Edit Client User Association</h2>
<div class="spacer"></div>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Associate Users to Companies</legend>

        @Html.HiddenFor(model => model.ClientUsersID)

         <div class="editor-label">
            @Html.Label("User")
        </div>
        <div class="editor-field">
            @Html.DropDownList("UserID", null, new { style = "width:300px;" })
            @Html.ValidationMessageFor(model => model.UserID)
        </div>

        <div class="editor-label">
            @Html.Label("Company")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CompanyID")
        </div>


        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

<script type="text/javascript">
    $(document).ready(function () {
        $("#UserID").val("@(Model.UserID)");
        $("#CompanyID").val("@(Model.CompanyID)");
    });
</script>